/**
 * 将针对admin的state、getters、mmutations、actions
 * 先全部放入adminStore中，最后通过index导出出去
 * 相当于一个小的index
 */
const state = {   //state是对象
    adminInfo:{}
}
const getters = {
    adminInfo:(state)=>state.adminInfo
}
const mutations = {
    setAdminInfo:(state,info)=>{
        state.adminInfo=info
    }
}
const actions = {
    setAdminInfo:({commit},info)=>{
        console.log('xxx',info);
        commit('setAdminInfo',info)
    }
}

const adminStore = {
    state,
    getters,
    mutations,
    actions
}

export default adminStore
